package com.scs.application.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.SimpleDataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 用户令牌信息
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "在线用户表")
@TableName("sys_online_user")
public class OnlineUser extends SimpleDataEntity {

    @EntityFieldAnnotation(
            text = "令牌",
            length = "100",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String token;

    @EntityFieldAnnotation(
            text = "用户编码",
            length = "32",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String userCode;

    @EntityFieldAnnotation(
            text = "设备类型。0：PC，1：柜子,2:APP",
            length = "1",
            not_null = true,
            default_value = "0",
            comment = ""
    )
    private String deviceType;

    @EntityFieldAnnotation(
            text = "设备类型名称",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deviceTypeName;

    @EntityFieldAnnotation(
            text = "登录时间",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Date gmtLogin;

    @EntityFieldAnnotation(
            text = "登录IP",
            length = "32",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String loginIp;

    @EntityFieldAnnotation(
            text = "过期时间",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Date gmtExpire;

}
